
<%@ include file="/WEB-INF/jsp/init.jsp" %>

<%@page import="com.liferay.portal.kernel.util.WebKeys"%>
<%@page import="com.liferay.portal.kernel.dao.search.ResultRow"%>

<%
	ResultRow row = (ResultRow) request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
	LMSBook book = (LMSBook) row.getObject();
	
	PortletURL editBookURL = renderResponse.createRenderURL();
	editBookURL.setParameter("bookId", String.valueOf(book.getBookId()));
	editBookURL.setParameter("action", "update");
	
	PortletURL viewDetailsURL = renderResponse.createRenderURL();
	viewDetailsURL.setParameter("action", "details");
	viewDetailsURL.setParameter("bookId", String.valueOf(book.getBookId()));
	viewDetailsURL.setParameter("showHeader", "true");
	viewDetailsURL.setParameter("backURL", themeDisplay.getURLCurrent());
%>

<liferay-ui:icon-menu>
	<liferay-ui:icon image="edit" message="Edit Book" url="<%= editBookURL.toString() %>" />
	<liferay-ui:icon image="view" message="View Details" url="<%= viewDetailsURL.toString() %>" />
</liferay-ui:icon-menu>

